package com.etoak.stock.mapper;

import com.etoak.stock.pojo.domin.SysPermissionDomain;
import com.etoak.stock.pojo.entity.SysPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 孙有泽
* @description 针对表【sys_permission(权限表（菜单）)】的数据库操作Mapper
* @createDate 2024-09-15 19:14:18
* @Entity com.etoak.stock.pojo.entity.SysPermission
*/
public interface SysPermissionMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysPermission record);

    int insertSelective(SysPermission record);

    SysPermission selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysPermission record);

    int updateByPrimaryKey(SysPermission record);

    List<SysPermission> selectAll();

    List<SysPermission> getPermissionListByUserId(@Param("id") Long id);

    List<SysPermissionDomain> selectAllPermission();

    int addPermission(@Param("sysPermission") SysPermission sysPermission);

    int updatePermission(@Param("sysPermission") SysPermission sysPermission);

    int deletePermission(@Param("permissionId") Long permissionId);

    int findChildrenCountByParentId(@Param("permissionId") Long permissionId);
}
